# Packager: Justin Davis (juster) <jrcd83@gmail.com>
# $Id: PKGBUILD 180396 2013-03-20 22:10:52Z eric $

pkgname=perl-mailtools
pkgver=2.12
pkgrel=1
pkgdesc='Various e-mail related modules'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=(perl-timedate)
url=https://metacpan.org/release/MailTools
source=("http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/MailTools-$pkgver.tar.gz")
md5sums=('b233a5723a0f5680d8ddd4dfdcb14c14')

build()
(
  cd MailTools-$pkgver
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd MailTools-$pkgver
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd MailTools-$pkgver
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
